18 #include "TMultiGraph.h" 32 <<
"[CalibrationHistograms::" << __func__ <<
"]" 33 <<
" Constructing object...";
49 <<
"[CalibrationHistograms::" << __func__ <<
"]" 50 <<
" Deleting object...";
58 Analyses::iterator ianal;
59 for ( ianal =
data().
begin(); ianal !=
data().end(); ianal++ ) {
60 if ( ianal->second ) {
delete ianal->second; }
65 HistosMap::const_iterator iter =
histos().begin();
68 for ( ; iter !=
histos().end(); iter++ ) {
69 if ( iter->second.empty() ) {
71 <<
"[CalibrationHistograms::" << __func__ <<
"]" 72 <<
" Zero collation histograms found!";
78 Histos::const_iterator ihis = iter->second.begin();
79 for ( ; ihis != iter->second.end(); ihis++ ) {
81 if ( prof ) { profs.push_back(prof); }
85 bool isdeconv =
false;
93 data()[iter->first] = anal;
96 for(
int iapv = 0; iapv < 2; iapv++){
108 data()[iter->first] = anal;
116 Analyses::iterator ianal =
data().begin();
117 Analyses::iterator janal =
data().end();
118 for ( ; ianal != janal; ++ianal ) {
119 if ( ianal->second ) {
120 std::stringstream ss;
121 ianal->second->print( ss,0 );
122 ianal->second->print( ss,1 );
137 std::stringstream ss;
138 if ( !path.empty() ) {
140 if ( ss.str().find(
".root") == std::string::npos ) { ss <<
".root"; }
147 if ( getenv(scratch.c_str()) !=
nullptr ) {
148 dir = getenv(scratch.c_str());
152 if ( !dir.empty() ) { ss << dir <<
"/"; }
153 else { ss <<
"/tmp/"; }
156 if(partitionName.empty())
158 << std::setfill(
'0') << std::setw(8) << run_number
162 << std::setfill(
'0') << std::setw(8) << run_number
168 <<
"[CommissioningHistograms::" << __func__ <<
"]" 169 <<
" Saving histograms to root file" 170 <<
" (This may take some time!)";
174 <<
"[CommissioningHistograms::" << __func__ <<
"]" 175 <<
" Saved histograms to root file \"" 176 << ss.str() <<
"\"!";
180 TFile*
outputFile = TFile::Open(path.c_str(),
"UPDATE");
185 bei()->getContents( contents );
187 TMultiGraph* graph_isha =
new TMultiGraph(
"riseTime_vs_isha",
"");
188 TMultiGraph* graph_vfs =
new TMultiGraph(
"decayTime_vs_vfs",
"");
190 bool save_graph_isha =
false;
191 bool save_graph_vfs =
false;
194 Analyses::iterator ianal =
data().begin();
195 Analyses::iterator janal =
data().end();
196 for ( ; ianal != janal; ++ianal ) {
197 if ( ianal->second ) {
204 std::vector<std::string> tokens;
206 std::istringstream tokenStream(
content);
207 while (std::getline(tokenStream, token,
':')){
208 tokens.push_back(token);
210 directory = Form(
"%s",tokens.at(0).c_str());
211 if(directory.Contains(Form(
"FecCrate%d",feckey.
fecCrate())) and
212 directory.Contains(Form(
"FecRing%d",feckey.
fecRing())) and
213 directory.Contains(Form(
"FecSlot%d",feckey.
fecSlot())) and
214 directory.Contains(Form(
"CcuAddr%d",feckey.
ccuAddr())) and
215 directory.Contains(Form(
"CcuChan%d",feckey.
ccuChan())))
219 outputFile->cd(
"DQMData/"+directory);
221 for(
size_t igraph = 0 ; igraph < anal->
decayTimeVsVFS().size(); igraph++){
224 save_graph_vfs =
true;
227 for(
size_t igraph = 0 ; igraph < anal->
riseTimeVsISHA().size(); igraph++){
230 save_graph_isha =
true;
245 outputFile->cd(
"DQMData/Collate/SiStrip/ControlView");
249 graph_isha->Write(
"riseTime_vs_isha");
251 graph_vfs->Write(
"decayTime_vs_vfs");
void save(std::string &filename, uint32_t run_number=0, std::string partitionName="")
void analysis(const std::vector< TH1 * > &)
const std::vector< TGraph2D * > & decayTimeVsISHAVsVFS()
~CalibrationHistograms() override
T getParameter(std::string const &) const
const sistrip::RunType & task() const
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
Analyses & data(bool getMaskedData=false)
const uint16_t & fecRing() const
const edm::ParameterSet & pset() const
const std::vector< TGraph * > & decayTimeVsVFS()
Algorithm for calibration runs.
static const char dqmClientFileName_[]
static const char mlDqmClient_[]
const uint16_t & fecSlot() const
Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.
Analysis for calibration runs.
CalibrationHistograms(const edm::ParameterSet &pset, DQMStore *, const sistrip::RunType &task=sistrip::CALIBRATION)
Analysis for calibration scans.
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
void printAnalyses() override
Algorithm for calibration runs.
const uint32_t & fecKey() const
void fillTunedObservables(const int &)
const uint16_t & fecCrate() const
int extract(std::vector< int > *output, const std::string &dati)
std::unique_ptr< Factory > factory_
const uint16_t & ccuAddr() const
void histoAnalysis(bool debug) override
void tuneIndependently(const int &, const float &, const float &)
const uint16_t & ccuChan() const
DQMStore *const bei() const
const std::vector< TGraph2D * > & riseTimeVsISHAVsVFS()
static const char collate_[]
void tuneSimultaneously(const int &, const float &, const float &)
const HistosMap & histos() const
const std::vector< TGraph * > & riseTimeVsISHA()