ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
Analysis::CalibrationDataInterfaceROOT::HadronisationReferenceHelper Class Reference

#include <CalibrationDataInterfaceROOT.h>

Collaboration diagram for Analysis::CalibrationDataInterfaceROOT::HadronisationReferenceHelper:

Public Member Functions

 HadronisationReferenceHelper (TMap *mapSF, TMap *mapEff)
 
 HadronisationReferenceHelper ()
 
bool getReference (const std::string &spec, std::string &ref) const
 Retrieve the (full) name of the reference histogram, given the hadronisation specification. More...
 

Private Attributes

std::map< std::string, std::string > m_refs
 map from hadronisation specification to container name More...
 

Detailed Description

Definition at line 363 of file CalibrationDataInterfaceROOT.h.

Constructor & Destructor Documentation

◆ HadronisationReferenceHelper() [1/2]

Analysis::CalibrationDataInterfaceROOT::HadronisationReferenceHelper::HadronisationReferenceHelper ( TMap *  mapSF,
TMap *  mapEff 
)

Definition at line 2742 of file CalibrationDataInterfaceROOT.cxx.

2743 {
2744  // Create the map from hadronisation specifications to reference container names for
2745  // a given ROOT file directory.
2746  //
2747  // mapSF: reference specification as extracted from calibration scale factor file
2748  // mapEff: reference specification as extracted from MC efficiency file
2749  // (null if the two files are identical)
2750 
2751  // First take the scale factor file's map
2752  if (mapSF) {
2753  TMapIter next(mapSF); TObjString* spec;
2754  while ((spec = (TObjString*) next())) {
2755  TObjString* ref = (TObjString*) mapSF->GetValue(spec);
2756  m_refs[string(spec->GetName())] = string(ref->GetName());
2757  }
2758  }
2759  // Then do the same with the efficiency file's map. The result will be to override any
2760  // items from the SF file's map. An exception is made for the scale factor calibration object,
2761  // for which (for the sake of consistency) the SF reference must be retained.
2762  if (mapEff) {
2763  TMapIter next(mapEff); TObjString* spec;
2764  while ((spec = (TObjString*) next())) {
2765  TObjString* ref = (TObjString*) mapEff->GetValue(spec);
2766  m_refs[string(spec->GetName())] = string(ref->GetName());
2767  }
2768  }
2769 }

◆ HadronisationReferenceHelper() [2/2]

Analysis::CalibrationDataInterfaceROOT::HadronisationReferenceHelper::HadronisationReferenceHelper ( )
inline

Definition at line 367 of file CalibrationDataInterfaceROOT.h.

367 {;}

Member Function Documentation

◆ getReference()

bool Analysis::CalibrationDataInterfaceROOT::HadronisationReferenceHelper::getReference ( const std::string &  spec,
std::string &  ref 
) const

Retrieve the (full) name of the reference histogram, given the hadronisation specification.

The return value will be false if the specification cannot be found, and true otherwise.

Definition at line 2773 of file CalibrationDataInterfaceROOT.cxx.

2775 {
2776  // Extract the reference histogram name corresponding to the given hadronisation specification (if existing).
2777  // The return value is used to indicate whether the specification could be found.
2778  //
2779  // spec: hadronisation specification
2780  // ref: container name corresponding to this specification
2781 
2782  std::map<string, string>::const_iterator it = m_refs.find(spec);
2783  if (it == m_refs.end()) return false;
2784 
2785  ref = it->second;
2786  return true;
2787 }

Member Data Documentation

◆ m_refs

std::map<std::string, std::string> Analysis::CalibrationDataInterfaceROOT::HadronisationReferenceHelper::m_refs
private

map from hadronisation specification to container name

Definition at line 376 of file CalibrationDataInterfaceROOT.h.


The documentation for this class was generated from the following files:
CaloCondBlobAlgs_fillNoiseFromASCII.spec
spec
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:46
skel.it
it
Definition: skel.GENtoEVGEN.py:407
fillPileUpNoiseLumi.next
next
Definition: fillPileUpNoiseLumi.py:52
Analysis::CalibrationDataInterfaceROOT::HadronisationReferenceHelper::m_refs
std::map< std::string, std::string > m_refs
map from hadronisation specification to container name
Definition: CalibrationDataInterfaceROOT.h:376
ref
const boost::regex ref(r_ef)