CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
edm::PrintEventSetupContent Class Reference
Inheritance diagram for edm::PrintEventSetupContent:
edm::EDAnalyzer

Public Member Functions

 PrintEventSetupContent (ParameterSet const &)
 
 ~PrintEventSetupContent ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Static Public Member Functions

static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 

Private Member Functions

virtual void analyze (Event const &, EventSetup const &)
 
virtual void beginJob ()
 
virtual void beginLuminosityBlock (LuminosityBlock const &, EventSetup const &)
 
virtual void beginRun (Run const &, EventSetup const &)
 
virtual void endJob ()
 
void print (EventSetup const &)
 

Private Attributes

std::map
< eventsetup::EventSetupRecordKey,
unsigned long long > 
cacheIdentifiers_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

Detailed Description

Definition at line 46 of file PrintEventSetupContent.cc.

Constructor & Destructor Documentation

PrintEventSetupContent::PrintEventSetupContent ( ParameterSet const &  iConfig)
explicit

Definition at line 79 of file PrintEventSetupContent.cc.

79  {
80  //now do what ever initialization is neededEventSetupRecordDataGetter::EventSetupRecordDataGetter(ParameterSet const& iConfig):
81  // getter = new EventSetupRecordDataGetter::EventSetupRecordDataGetter(iConfig);
82  }
PrintEventSetupContent::~PrintEventSetupContent ( )

Definition at line 85 of file PrintEventSetupContent.cc.

85  {
86 
87  // do anything here that needs to be done at desctruction time
88  // (e.g. close files, deallocate resources etc.)
89 
90  }

Member Function Documentation

void PrintEventSetupContent::analyze ( Event const &  iEvent,
EventSetup const &  iSetup 
)
privatevirtual

Implements edm::EDAnalyzer.

Definition at line 99 of file PrintEventSetupContent.cc.

References print().

99  {
100  print(iSetup);
101  }
void print(EventSetup const &)
void PrintEventSetupContent::beginJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 162 of file PrintEventSetupContent.cc.

162  {
163  }
void PrintEventSetupContent::beginLuminosityBlock ( LuminosityBlock const &  ,
EventSetup const &  iSetup 
)
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 109 of file PrintEventSetupContent.cc.

References print().

109  {
110  print(iSetup);
111  }
void print(EventSetup const &)
void PrintEventSetupContent::beginRun ( Run const &  ,
EventSetup const &  iSetup 
)
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 104 of file PrintEventSetupContent.cc.

References print().

104  {
105  print(iSetup);
106  }
void print(EventSetup const &)
void PrintEventSetupContent::endJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 167 of file PrintEventSetupContent.cc.

167  {
168  }
void PrintEventSetupContent::fillDescriptions ( ConfigurationDescriptions descriptions)
static

Definition at line 172 of file PrintEventSetupContent.cc.

References edm::ConfigurationDescriptions::add(), and edm::ConfigurationDescriptions::setComment().

172  {
174  descriptions.setComment("Print what data is available in each available EventSetup Record in the job.\n"
175  "As part of the data is the C++ class type, label and which module makes that data.");
176  descriptions.add("printEventSetupContent", desc);
177  }
void PrintEventSetupContent::print ( EventSetup const &  iSetup)
private

Definition at line 114 of file PrintEventSetupContent.cc.

References edm::eventsetup::EventSetupRecord::cacheIdentifier(), cacheIdentifiers_, runTheMatrix::data, edm::IOVSyncValue::eventID(), edm::EventSetup::fillAvailableRecordKeys(), edm::eventsetup::EventSetupRecord::fillRegisteredDataKeys(), edm::EventSetup::find(), edm::ValidityInterval::first(), edm::eventsetup::ComponentDescription::label_, edm::ValidityInterval::last(), edm::eventsetup::EventSetupRecord::providerDescription(), edm::IOVSyncValue::time(), edm::eventsetup::ComponentDescription::type_, edm::eventsetup::EventSetupRecord::validityInterval(), and edm::Timestamp::value().

Referenced by analyze(), beginLuminosityBlock(), and beginRun().

114  {
115  typedef std::vector<eventsetup::EventSetupRecordKey> Records;
116  typedef std::vector<eventsetup::DataKey> Data;
117 
118  Records records;
119  Data data;
120  iSetup.fillAvailableRecordKeys(records);
121  int iflag=0;
122 
123 
124  for(Records::iterator itrecords = records.begin(), itrecordsend = records.end();
125  itrecords != itrecordsend; ++itrecords ) {
126 
127  eventsetup::EventSetupRecord const* rec = iSetup.find(*itrecords);
128 
129 
130 
131  if(0 != rec && cacheIdentifiers_[*itrecords] != rec->cacheIdentifier() ) {
132  ++iflag;
133  if(iflag==1)
134  LogSystem("ESContent")<<"\n"<<"Changed Record"<<"\n "<<"<datatype>"<<" "<<"'label' provider: 'provider label' <provider module type>";
135  cacheIdentifiers_[*itrecords] = rec->cacheIdentifier();
136  LogAbsolute("ESContent")<<itrecords->name()<<std::endl;
137 
138  LogAbsolute("ESContent")<<" start: "<<rec->validityInterval().first().eventID()<<" time: "<<rec->validityInterval().first().time().value()<<std::endl;
139  LogAbsolute("ESContent")<<" end: "<<rec->validityInterval().last().eventID()<<" time: "<<rec->validityInterval().last().time().value()<<std::endl;
140  rec->fillRegisteredDataKeys(data);
141  for(Data::iterator itdata = data.begin(), itdataend = data.end(); itdata != itdataend; ++itdata){
142  const edm::eventsetup::ComponentDescription* cd = rec->providerDescription(*itdata);
143  LogAbsolute("ESContent")<<" "<<itdata->type().name()<<" '"<<itdata->name().value()<<"'"<< " provider:'"<<cd->label_<<"' "<<cd->type_<<std::endl;
144  }
145  }
146  }
147  }
std::map< eventsetup::EventSetupRecordKey, unsigned long long > cacheIdentifiers_

Member Data Documentation

std::map<eventsetup::EventSetupRecordKey, unsigned long long > edm::PrintEventSetupContent::cacheIdentifiers_
private

Definition at line 65 of file PrintEventSetupContent.cc.

Referenced by print().