CMS 3D CMS Logo

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

#include <SamplingHistograms.h>

Inheritance diagram for SamplingHistograms:
CommissioningHistograms FineDelayHistosUsingDb LatencyHistosUsingDb SamplingHistosUsingDb

Public Member Functions

virtual void configure (const edm::ParameterSet &, const edm::EventSetup &)
 
void histoAnalysis (bool debug)
 
 SamplingHistograms (const edm::ParameterSet &pset, DQMStore *, const sistrip::RunType &task=sistrip::APV_LATENCY)
 
virtual ~SamplingHistograms ()
 
- Public Member Functions inherited from CommissioningHistograms
 CommissioningHistograms (const edm::ParameterSet &pset, DQMStore *const, const sistrip::RunType &)
 
 CommissioningHistograms ()
 
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 printAnalyses ()
 
virtual void printSummary ()
 
void remove (std::string pattern="")
 
void save (std::string &filename, uint32_t run_number=0)
 
virtual ~CommissioningHistograms ()
 

Private Attributes

int latencyCode_
 
float sOnCut_
 

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
 
- Protected Attributes inherited from CommissioningHistograms
std::auto_ptr< Factoryfactory_
 

Detailed Description

Definition at line 10 of file SamplingHistograms.h.

Constructor & Destructor Documentation

SamplingHistograms::SamplingHistograms ( const edm::ParameterSet pset,
DQMStore bei,
const sistrip::RunType task = sistrip::APV_LATENCY 
)

Definition at line 19 of file SamplingHistograms.cc.

References sistrip::collate_, CommissioningHistograms::factory_, DQMStore::get(), MonitorElement::getIntValue(), latencyCode_, LogTrace, sistrip::mlDqmClient_, sistrip::root_, and AlCaHLTBitMon_QueryRunRegistry::string.

22  : CommissioningHistograms( pset.getParameter<edm::ParameterSet>("SamplingParameters"),
23  bei,
24  task ),
25  sOnCut_(3)
26 {
28  << "[SamplingHistograms::" << __func__ << "]"
29  << " Constructing object...";
30  factory_ = auto_ptr<SamplingSummaryFactory>( new SamplingSummaryFactory );
31  // retreive the latency code from the root file
32  std::string dataPath = std::string(sistrip::collate_) + "/" + sistrip::root_ + "/latencyCode";
33  MonitorElement* codeElement = bei->get(dataPath);
34  if(codeElement) latencyCode_ = codeElement->getIntValue() ;
35  else latencyCode_ = 0;
36 }
T getParameter(std::string const &) const
const sistrip::RunType & task() const
static const char mlDqmClient_[]
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1696
#define LogTrace(id)
int64_t getIntValue(void) const
std::auto_ptr< Factory > factory_
static const char root_[]
static const char collate_[]
SamplingHistograms::~SamplingHistograms ( )
virtual

Definition at line 40 of file SamplingHistograms.cc.

References LogTrace, and sistrip::mlDqmClient_.

40  {
42  << "[SamplingHistograms::" << __func__ << "]"
43  << " Deleting object...";
44 }
static const char mlDqmClient_[]
#define LogTrace(id)

Member Function Documentation

void SamplingHistograms::configure ( const edm::ParameterSet pset,
const edm::EventSetup  
)
virtual

Reimplemented from CommissioningHistograms.

Reimplemented in FineDelayHistosUsingDb, and LatencyHistosUsingDb.

Definition at line 87 of file SamplingHistograms.cc.

References sOnCut_.

Referenced by FineDelayHistosUsingDb::configure().

88 {
89  //TODO: should use the parameter set. Why is this crashing ???
90 // sOnCut_ = pset.getParameter<double>("SignalToNoiseCut");
91  sOnCut_ = 3.;
92 }
void SamplingHistograms::histoAnalysis ( bool  debug)
virtual

Reimplemented from CommissioningHistograms.

Definition at line 48 of file SamplingHistograms.cc.

References CommissioningAlgorithm::analysis(), begin, CommissioningHistograms::data(), extract(), CommissioningHistograms::histos(), getDQMSummary::iter, latencyCode_, sistrip::mlDqmClient_, CommissioningHistograms::pset(), SamplingAnalysis::setSoNcut(), and sOnCut_.

48  {
49 
50  // Clear map holding analysis objects
51  Analyses::iterator ianal;
52  for ( ianal = data().begin(); ianal != data().end(); ianal++ ) {
53  if ( ianal->second ) { delete ianal->second; }
54  }
55  data().clear();
56 
57  // Iterate through map containing vectors of profile histograms
58  HistosMap::const_iterator iter = histos().begin();
59  for ( ; iter != histos().end(); iter++ ) {
60  // Check vector of histos is not empty (should be 1 histo)
61  if ( iter->second.empty() ) {
63  << "[SamplingHistograms::" << __func__ << "]"
64  << " Zero collation histograms found!";
65  continue;
66  }
67 
68  // Retrieve pointers to profile histos for this FED channel
69  vector<TH1*> profs;
70  Histos::const_iterator ihis = iter->second.begin();
71  for ( ; ihis != iter->second.end(); ihis++ ) {
72  TProfile* prof = ExtractTObject<TProfile>().extract( (*ihis)->me_ );
73  if ( prof ) { profs.push_back(prof); }
74  }
75 
76  // Perform histo analysis
77  SamplingAnalysis* anal = new SamplingAnalysis( iter->first );
78  anal->setSoNcut(sOnCut_);
79  SamplingAlgorithm algo( this->pset(), anal, latencyCode_ );
80  algo.analysis( profs );
81  data()[iter->first] = anal;
82 
83  }
84 
85 }
Analysis for latency run.
Algorithm for latency run.
const edm::ParameterSet & pset() const
void setSoNcut(const float sOnCut)
static const char mlDqmClient_[]
int extract(std::vector< int > *output, const std::string &dati)
#define begin
Definition: vmac.h:30
const HistosMap & histos() const

Member Data Documentation

int SamplingHistograms::latencyCode_
private

Definition at line 25 of file SamplingHistograms.h.

Referenced by histoAnalysis(), and SamplingHistograms().

float SamplingHistograms::sOnCut_
private

Definition at line 23 of file SamplingHistograms.h.

Referenced by configure(), and histoAnalysis().