Belle II Software  release-08-01-10
calibration
Collaboration diagram for calibration:

Modules

 calibration data objects
 
 calibration modules
 

Classes

class  MergeableNamed
 Abstract base class for objects that can be merged but also named. More...
 
class  TestCalibMean
 Test DBObject. More...
 
class  TestCalibObject
 Test DBObject. More...
 
class  TestBoundarySettingAlgorithm
 Test class implementing calibration algorithm. More...
 
class  TestCalibrationAlgorithm
 Test class implementing calibration algorithm. More...
 
class  TestDBAccessAlgorithm
 Test class implementing calibration algorithm. More...
 
class  CalibObjManager
 Manager class for collector registered data. Handles much of the TDirectory/TObject manipulation. More...
 
class  CalibrationAlgorithm
 Base class for calibration algorithms. More...
 
class  CalibrationCollectorModule
 Calibration collector module base class. More...
 
class  DBObjCalibrationConstMapBase
 Base for calibration or alignment parameters identified by two unsigned shorts Typically first is some identifier of a sub-detector element (sensor, layer, wire, board...) and the second is number of parameter. More...
 

Functions

template<>
TTree * cloneObj (TTree *source, const std::string &newName) const
 Template specialization for TTree needs to be defined here to prevent automatic specialization being created.
 
template<class T >
std::shared_ptr< T > getObjectPtr (const std::string &name, const std::vector< Calibration::ExpRun > &requestedRuns)
 Get calibration data object by name and list of runs, the Merge function will be called to generate the overall object.
 
template<>
std::shared_ptr< TTree > getObjectPtr (const std::string &name, const std::vector< Calibration::ExpRun > &requestedRuns)
 Specialization of getObjectPtr<TTree>.
 
void deleteHeldObjects ()
 Clears the map of templated objects -> causing their destruction.
 
void addObject (const std::string &name, std::shared_ptr< TNamed > object)
 Add a new object to manage, this is used as a template for creating future/missing objects. More...
 
void createDirectories ()
 Each object gets its own TDirectory under the main manager directory to store its objects. More...
 
void createExpRunDirectories (Calibration::ExpRun &expRun) const
 For each templated object, we create a new TDirectory for this exprun.
 
void writeCurrentObjects (const Calibration::ExpRun &expRun)
 For each templated object we know about, we find an in memory object for this exprun and write to the TDirectory.
 
void clearCurrentObjects (const Calibration::ExpRun &expRun)
 Deletes all in-memory objects in the exprun directories for all the collector objects we know about.
 
unsigned int getHighestIndexObject (const std::string &name, const TDirectory *dir) const
 Scans the directory to get the highest "_i" index of an object with this name.
 
std::string getSuffix (const EventMetaData &emd) const
 Sometimes it's nice to just pass in the EventMetaData instead of converting manually.
 
std::string getObjectExpRunName (const std::string &name, const Calibration::ExpRun &expRun) const
 Get object experiment and run name.
 
unsigned int extractKeyIndex (const std::string &keyName) const
 Extract key index.
 
bool isRegistered (const std::string &name) const
 Checks for the existence of a name in the templated object map to see if we registered the object.
 
template<>
shared_ptr< TTree > getObjectPtr (const string &name, const vector< ExpRun > &requestedRuns)
 We cheekily cast the TChain to TTree for the returned pointer so that the user never knows Hopefully this doesn't cause issues if people do low level stuff to the tree...
 

Detailed Description

Function Documentation

◆ addObject()

void addObject ( const std::string &  name,
std::shared_ptr< TNamed >  object 
)

Add a new object to manage, this is used as a template for creating future/missing objects.

We take ownership of this object but cannot guarantee that a user won't alter the wrapped ROOT object :(

Definition at line 40 of file CalibObjManager.cc.

41  {
42  if (m_templateObjects.find(name) != m_templateObjects.end()) {
43  m_templateObjects[name].reset();
44  }
45  m_templateObjects[name] = object;
46  }
std::map< std::string, std::shared_ptr< TNamed > > m_templateObjects
The objects that we are managing, these are template objects for all future objects for each (Exp,...

◆ createDirectories()

void createDirectories ( )

Each object gets its own TDirectory under the main manager directory to store its objects.

We create them using this function.

Definition at line 48 of file CalibObjManager.cc.