CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CentralityTableHandler.cc
Go to the documentation of this file.
5 
6 #include <TFile.h>
7 #include <iostream>
8 using namespace std;
9 using namespace popcon;
10 
12  // cond::TagInfo const & tagInfo_ = tagInfo();
13  // cond::LogDBEntry const & logDBEntry_ = logDBEntry();
14  Ref payload = lastPayload();
15  cond::Time_t snc = 1;
16  TFile* inputTFile_ = new TFile(inputTFileName_.data(),"read");
17  runnum_ = 1;
18  CentralityBins* CB = (CentralityBins*) inputTFile_->Get(Form("%s/run%d",centralityTag_.data(),runnum_));
19  cout<<centralityTag_.data()<<endl;
20  CentralityTable* CT = new CentralityTable();
21  CT->m_table.reserve(CB->getNbins());
22 
23  for(int j=0; j<CB->getNbins(); j++){
25  thisBin->bin_edge = CB->lowEdgeOfBin(j);
26  thisBin->n_part.mean = CB->NpartMeanOfBin(j);
27  thisBin->n_part.var = CB->NpartSigmaOfBin(j);
28  thisBin->n_coll.mean = CB->NcollMeanOfBin(j);
29  thisBin->n_coll.var = CB->NcollSigmaOfBin(j);
30  thisBin->n_hard.mean = CB->NhardMeanOfBin(j);
31  thisBin->n_hard.var = CB->NhardSigmaOfBin(j);
32  thisBin->b.mean = CB->bMeanOfBin(j);
33  thisBin->b.var = CB->bSigmaOfBin(j);
34 
35  CT->m_table.push_back(*thisBin);
36  }
37 
38  m_to_transfer.push_back(std::make_pair(CT,snc));
39 
40 }
41 
44 
45 
46 
47 
std::vector< CBin > m_table
float NpartSigmaOfBin(int bin) const
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
float lowEdgeOfBin(int bin) const
popcon::PopConAnalyzer< CentralityTableHandler > CentralityPopConProducer
unsigned long long Time_t
Definition: Time.h:16
float NcollMeanOfBin(int bin) const
int j
Definition: DBlmapReader.cc:9
float bSigmaOfBin(int bin) const
float NhardMeanOfBin(int bin) const
float NpartMeanOfBin(int bin) const
int getNbins() const
float bMeanOfBin(int bin) const
tuple cout
Definition: gather_cfg.py:121
float NhardSigmaOfBin(int bin) const
float NcollSigmaOfBin(int bin) const