test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Attributes
CalibrationHistograms Class Reference

#include <CalibrationHistograms.h>

Inheritance diagram for CalibrationHistograms:
CommissioningHistograms CalibrationHistosUsingDb

Public Member Functions

 CalibrationHistograms (const edm::ParameterSet &pset, DQMStore *, const sistrip::RunType &task=sistrip::CALIBRATION)
 
void histoAnalysis (bool debug)
 
void printAnalyses ()
 
virtual ~CalibrationHistograms ()
 
- Public Member Functions inherited from CommissioningHistograms
 CommissioningHistograms (const edm::ParameterSet &pset, DQMStore *const, const sistrip::RunType &)
 
 CommissioningHistograms ()
 
virtual void configure (const edm::ParameterSet &, const edm::EventSetup &)
 
void createCollations (const std::vector< std::string > &)
 
virtual void createSummaryHisto (const sistrip::Monitorable &, const sistrip::Presentation &, const std::string &top_level_dir, const sistrip::Granularity &)
 
void extractHistograms (const std::vector< std::string > &)
 
virtual void printSummary ()
 
void remove (std::string pattern="")
 
void save (std::string &filename, uint32_t run_number=0)
 
virtual ~CommissioningHistograms ()
 

Protected Attributes

int calchan_
 
int isha_
 
int vfs_
 
- Protected Attributes inherited from CommissioningHistograms
std::auto_ptr< Factoryfactory_
 

Additional Inherited Members

- Public Types inherited from CommissioningHistograms
typedef std::map< uint32_t,
CommissioningAnalysis * > 
Analyses
 
typedef Analyses::iterator Analysis
 
typedef SummaryPlotFactory
< CommissioningAnalysis * > 
Factory
 
typedef std::map< uint32_t,
uint32_t > 
FedToFecMap
 
typedef std::vector< Histo * > Histos
 
typedef std::map< uint32_t,
Histos
HistosMap
 
- Static Public Member Functions inherited from CommissioningHistograms
static void copyCustomInformation (DQMStore *const, const std::vector< std::string > &)
 
static void getContents (DQMStore *const, std::vector< std::string > &)
 
static uint32_t runNumber (DQMStore *const, const std::vector< std::string > &)
 
static sistrip::RunType runType (DQMStore *const, const std::vector< std::string > &)
 
- Protected Member Functions inherited from CommissioningHistograms
DQMStore *const bei () const
 
void clearHistosMap ()
 
Analysesdata ()
 
Factory *const factory ()
 
TH1 * histogram (const sistrip::Monitorable &, const sistrip::Presentation &, const sistrip::View &, const std::string &directory, const uint32_t &xbins, const float &xlow=1.*sistrip::invalid_, const float &xhigh=1.*sistrip::invalid_)
 
const HistosMaphistos () const
 
const FedToFecMapmapping () const
 
void printHistosMap ()
 
const edm::ParameterSetpset () const
 
const sistrip::RunTypetask () const
 

Detailed Description

Definition at line 9 of file CalibrationHistograms.h.

Constructor & Destructor Documentation

CalibrationHistograms::CalibrationHistograms ( const edm::ParameterSet pset,
DQMStore bei,
const sistrip::RunType task = sistrip::CALIBRATION 
)

Definition at line 19 of file CalibrationHistograms.cc.

References calchan_, sistrip::collate_, CommissioningHistograms::factory_, MonitorElement::getIntValue(), isha_, LogTrace, sistrip::mlDqmClient_, sistrip::root_, AlCaHLTBitMon_QueryRunRegistry::string, groupFilesInBlocks::temp, and vfs_.

22  : CommissioningHistograms( pset.getParameter<edm::ParameterSet>("CalibrationParameters"),
23  bei,
24  task ),
25  calchan_(0),
26  isha_(-1),
27  vfs_(-1)
28 {
30  << "[CalibrationHistograms::" << __func__ << "]"
31  << " Constructing object...";
33  factory_ = auto_ptr<CalibrationSummaryFactory>( new CalibrationSummaryFactory );
34  MonitorElement* calchanElement = bei->get(temp + "/calchan");
35  if(calchanElement) {
36  calchan_ = calchanElement->getIntValue();
38  << "[CalibrationHistograms::" << __func__ << "]"
39  << "CalChan value is " << calchan_;
40  } else {
42  << "[CalibrationHistograms::" << __func__ << "]"
43  << "CalChan value not found. Using " << calchan_;
44  }
45  MonitorElement* ishaElement = bei->get(temp + "/isha");
46  if(ishaElement) isha_ = ishaElement->getIntValue() ;
47  MonitorElement* vfsElement = bei->get(temp + "/vfs");
48  if(vfsElement) vfs_ = vfsElement->getIntValue() ;
49 }
T getParameter(std::string const &) const
const sistrip::RunType & task() const
static const char mlDqmClient_[]
#define LogTrace(id)
int64_t getIntValue(void) const
std::auto_ptr< Factory > factory_
static const char root_[]
DQMStore *const bei() const
static const char collate_[]
CalibrationHistograms::~CalibrationHistograms ( )
virtual

Definition at line 53 of file CalibrationHistograms.cc.

References LogTrace, and sistrip::mlDqmClient_.

53  {
55  << "[CalibrationHistograms::" << __func__ << "]"
56  << " Deleting object...";
57 }
static const char mlDqmClient_[]
#define LogTrace(id)

Member Function Documentation

void CalibrationHistograms::histoAnalysis ( bool  debug)
virtual

Reimplemented from CommissioningHistograms.

Definition at line 61 of file CalibrationHistograms.cc.

References ecalcalib_dqm_sourceclient-live_cfg::algo, CommissioningAlgorithm::analysis(), begin, calchan_, sistrip::CALIBRATION_DECO, CommissioningHistograms::data(), extract(), CommissioningHistograms::histos(), sistrip::mlDqmClient_, CommissioningHistograms::pset(), and CommissioningHistograms::task().

61  {
62 
63  // Clear map holding analysis objects
64  Analyses::iterator ianal;
65  for ( ianal = data().begin(); ianal != data().end(); ianal++ ) {
66  if ( ianal->second ) { delete ianal->second; }
67  }
68  data().clear();
69 
70  // Iterate through map containing vectors of profile histograms
71  HistosMap::const_iterator iter = histos().begin();
72  for ( ; iter != histos().end(); iter++ ) {
73  // Check vector of histos is not empty (should be 1 histo)
74  if ( iter->second.empty() ) {
76  << "[CalibrationHistograms::" << __func__ << "]"
77  << " Zero collation histograms found!";
78  continue;
79  }
80 
81  // Retrieve pointers to 1D histos for this FED channel
82  vector<TH1*> profs;
83  Histos::const_iterator ihis = iter->second.begin();
84  for ( ; ihis != iter->second.end(); ihis++ ) {
85  TH1F* prof = ExtractTObject<TH1F>().extract( (*ihis)->me_ );
86  if ( prof ) { profs.push_back(prof); }
87  }
88  // Perform histo analysis
90  CalibrationAlgorithm algo( this->pset(), anal );
91  algo.analysis( profs );
92  data()[iter->first] = anal;
93 
94  }
95 
96 }
const sistrip::RunType & task() const
const edm::ParameterSet & pset() const
Algorithm for calibration runs.
static const char mlDqmClient_[]
Analysis for calibration runs.
int extract(std::vector< int > *output, const std::string &dati)
#define begin
Definition: vmac.h:30
const HistosMap & histos() const
void CalibrationHistograms::printAnalyses ( )
virtual

Reimplemented from CommissioningHistograms.

Definition at line 100 of file CalibrationHistograms.cc.

References CommissioningHistograms::data(), LogTrace, sistrip::mlDqmClient_, and contentValuesCheck::ss.

100  {
101  Analyses::iterator ianal = data().begin();
102  Analyses::iterator janal = data().end();
103  for ( ; ianal != janal; ++ianal ) {
104  if ( ianal->second ) {
105  std::stringstream ss;
106  ianal->second->print( ss,0 );
107  ianal->second->print( ss,1 );
108  if ( ianal->second->isValid() ) { LogTrace(mlDqmClient_) << ss.str();
109  } else { edm::LogWarning(mlDqmClient_) << ss.str(); }
110  }
111  }
112 }
static const char mlDqmClient_[]
#define LogTrace(id)

Member Data Documentation

int CalibrationHistograms::calchan_
protected
int CalibrationHistograms::isha_
protected
int CalibrationHistograms::vfs_
protected