Jpp  18.2.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | List of all members
JRECONSTRUCTION::JStringEditor Struct Reference

Auxiliary class to edit time offset of data per string. More...

Inheritance diagram for JRECONSTRUCTION::JStringEditor:
JFIT::JParameter_t

Public Member Functions

 JStringEditor (data_type &data, const int id)
 Constructor. More...
 
virtual void apply (const double step) override
 Apply step. More...
 

Public Attributes

data_typedata
 data More...
 
int id
 string identifier More...
 
double t0
 time offset [ns] More...
 

Detailed Description

Auxiliary class to edit time offset of data per string.

Definition at line 85 of file JPerth.cc.

Constructor & Destructor Documentation

JRECONSTRUCTION::JStringEditor::JStringEditor ( data_type data,
const int  id 
)
inline

Constructor.

Parameters
datadata
idstring identifier

Definition at line 94 of file JPerth.cc.

94  :
95  data(data),
96  id(id),
97  t0(0.0)
98  {}
int id
string identifier
Definition: JPerth.cc:123
data_type & data
data
Definition: JPerth.cc:122
double t0
time offset [ns]
Definition: JPerth.cc:124

Member Function Documentation

virtual void JRECONSTRUCTION::JStringEditor::apply ( const double  step)
inlineoverridevirtual

Apply step.

Parameters
stepstep

Implements JFIT::JParameter_t.

Definition at line 106 of file JPerth.cc.

107  {
108  for (data_type::iterator evt = data.begin(); evt != data.end(); ++evt) {
109 
110  map_type::iterator p = evt->data.find(id);
111 
112  if (p != evt->data.end()) {
113  for (buffer_type::iterator hit = p->second.begin(); hit != p->second.end(); ++hit) {
114  static_cast<JTRIGGER::JHit&>(*hit) = JTRIGGER::JHit(hit->getT1() + step, hit->getToT());
115  }
116  }
117  }
118 
119  this->t0 += step;
120  }
Hit data structure.
data_type & data
data
Definition: JPerth.cc:122
double t0
time offset [ns]
Definition: JPerth.cc:124

Member Data Documentation

data_type& JRECONSTRUCTION::JStringEditor::data

data

Definition at line 122 of file JPerth.cc.

int JRECONSTRUCTION::JStringEditor::id

string identifier

Definition at line 123 of file JPerth.cc.

double JRECONSTRUCTION::JStringEditor::t0

time offset [ns]

Definition at line 124 of file JPerth.cc.


The documentation for this struct was generated from the following file: