9 #include "boost/filesystem/operations.hpp"
21 for (
int i=2;
i<9;
i++) slotsOn[
i]=1;
23 for (
int i=13;
i<19;
i++) slotsOn[
i]=1;
60 << HEID.
htrSlot() <<
")" << std::endl;
85 << HEID.
htrSlot() <<
")" << std::endl;
110 << HEID.
htrSlot() <<
")" << std::endl;
120 std::cout <<
"Writing XML..." << std::endl;
127 std::cerr <<
"XML output file " << name <<
" is bad." << std::endl;
130 (*of) <<
"<?xml version='1.0' encoding='UTF-8'?>" << std::endl;
141 snprintf(cr_name,256,
"_crate_%d.xml",crate);
145 std::cerr <<
"XML output file " << name <<
" is bad." << std::endl;
148 (*of) <<
"<?xml version='1.0' encoding='UTF-8'?>" << std::endl;
153 for (
int tb=0; tb<=1; tb++) {
156 for (
int fiber=1; fiber<=8; fiber++) {
161 snprintf(cr_name,256,
"_crate_%d_slot_%d_tb_%d_fiber_%d.xml",crate,slot,tb,fiber);
165 std::cerr <<
"XML output file " << name <<
" is bad." << std::endl;
168 (*of) <<
"<?xml version='1.0' encoding='UTF-8'?>" << std::endl;
182 (*of) <<
"</CFGBrickSet>" << std::endl;
191 (*of) <<
"</CFGBrickSet>" << std::endl;
199 std::cout <<
"Writing root file..." << std::endl;
201 TFile of(name.c_str(),
"RECREATE");
203 std::cerr <<
"root output file " << name <<
" is bad." << std::endl;
213 for (
int tb=0; tb<=1; tb++) {
216 for (
int chan=1; chan<=24; chan++) {
219 sprintf(hname,
"Exact fC Cr%d,%d%s-%d",crate,slot,
220 ((tb==1)?(
"t"):(
"b")),chan);
223 sprintf(hname,
"Quantized fC Cr%d,%d%s-%d",crate,slot,
224 ((tb==1)?(
"t"):(
"b")),chan);
227 sprintf(hname,
"Encoded fC Cr%d,%d%s-%d",crate,slot,
228 ((tb==1)?(
"t"):(
"b")),chan);
232 hp->Fill(
i*1.0,(*cp)[
i]);
238 of.cd(
"adc"); ha->Write();
int getCoded(int bc) const
int htrSlot() const
get the htr slot
std::vector< HBHEDataFrame >::const_iterator const_iterator
void setTagName(std::string tn)
int readoutVMECrateId() const
get the readout VME crate number
static const int NUM_CRATES
void Fill(HtrXmlPatternToolParameters *params, HBHEDigiCollection::const_iterator data)
int htrTopBottom() const
get the htr top/bottom (1=top/0=bottom), valid for VME
ChannelPattern * getPattern(int chan)
int htrChanId() const
get the HTR channel id (1-24)
int dccid() const
get the (Hcal local) DCC id for VME, crate number for uTCA
static const int NUM_SLOTS
int spigot() const
get the spigot (input number on DCC, AMC card number for uTCA)
double getQuantized(int bc) const
HalfHtrData * getHalfHtrData(int slot, int one_two_tb)
CrateData * getCrate(int crate)
void setSpigot(int spigot)
char data[epos_bytes_allocation]
void writePattern(HalfHtrData *spigotData, int fiber, std::ostream &os, int level=0)
Readout chain identification for Hcal.