35 slopeErr=r.getSlopeErr();
36 offsetErr=r.getOffsetErr();
37 slopeMethod=r.getSlopeMethod();
38 offsetMethod=r.getOffsetMethod();
44 array =
new TObjArray(tdc);
45 for (Int_t i=0; i<tdc; ++i) array->AddAt(
new HMdcCalParTdc(),i);
56 array =
new TObjArray(mbo);
67 if (mbo<array->GetSize() && array->At(mbo)==NULL) {
74 array =
new TObjArray(mod);
75 for (Int_t i=0; i<mod; i++)
86 const Char_t* context,Int_t
n)
90 array =
new TObjArray(n);
106 if (pRawStruct==NULL) {
107 Error(
"HMdcCalParRaw::init()",
"MdcCalParRaw not initialized, container MdcRawStruct not found");
110 for(Int_t s=0;s<
getSize();s++) {
113 for(Int_t m=0;m<secPar.
getSize();m++) {
116 for(Int_t i=0;i<modStru.
getSize();i++) {
117 modPar.
createMbo(i,modStru[i].getNTdcs(),modStru[i].GetName());
122 if (input)
return (input->
init(
this,set));
129 if (out)
return out->
write(
this);
135 Int_t sec, mod, mbo, tdc, slopeMethod,offsetMethod;
136 Float_t slope, offset, slopeErr,offsetErr;
138 sscanf(buf,
"%i%i%i%s%i%f%f%f%f%i%i",
139 &sec, &mod, &mbo, mboName, &tdc, &slope, &offset, &slopeErr,
140 &offsetErr, &slopeMethod, &offsetMethod);
144 rMbo.SetName(mboName);
146 t.
fill(slope,offset,slopeErr,offsetErr,slopeMethod,offsetMethod);
153 "# Calibration parameters of the MDC\n"
155 "# sector module mbo mboName tdc slope offset slopeErr offsetErr slopeMethod offsetMethod\n";
162 sprintf(buf,
"%1i %1i %2i %s %3i % 10.5f % 10.2f % 12.5f % 12.2f %1i %1i \n",
163 sec, mod, mbo, rMbo.GetName(), tdc,
171 for(Int_t s=0;s<
getSize();s++) {
173 for(Int_t m=0;m<sec.
getSize();m++) {
175 for(Int_t l=0;l<mod.
getSize();l++) {
188 for(Int_t s=0;s<
getSize();s++) {
190 for(Int_t m=0;m<sec.
getSize();m++) {
192 for(Int_t l=0;l<mod.
getSize();l++) {
194 for(Int_t c=0;c<mbo.
getSize();c++){
196 "%1i %1i %2i %s %3i % 10.5f % 10.2f % 12.5f % 12.2f %1i %1i\n",
197 s, m, l, mbo.GetName(),c,
198 mbo[c].getSlope(),mbo[c].getOffset(),
199 mbo[c].getSlopeErr(),mbo[c].getOffsetErr(),
200 mbo[c].getSlopeMethod(),mbo[c].getOffsetMethod()
208 void HMdcCalParRaw::Streamer(TBuffer &R__b)
212 TString fDescription;
217 if (R__b.IsReading())
219 Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
if (R__v) { }
222 HParSet::Streamer(R__b);
224 fAuthor.Streamer(R__b);
225 fDescription.Streamer(R__b);
226 fRunsUsed.Streamer(R__b);
227 fValidity.Streamer(R__b);
228 R__b.CheckByteCount(R__s, R__c, HMdcCalParRaw::IsA());
232 HParSet::Streamer(R__b);
234 R__b.CheckByteCount(R__s, R__c, HMdcCalParRaw::IsA());
236 else{Error(
"HMdcCalParRaw:Streamer()",
"Read version not known!");}
240 HMdcCalParRaw::Class()->WriteBuffer(R__b,
this);
HMdcCalParRawMod(Int_t mbo=16)
void fill(Float_t s, Float_t o, Float_t sE, Float_t oE, Int_t sM, Int_t oM)
HRuntimeDb * getRuntimeDb(void)
virtual Bool_t init(HParSet *, Int_t *)
Bool_t writeline(Char_t *, Int_t, Int_t, Int_t, Int_t)
virtual HDetParIo * getDetParIo(const Text_t *)
void info(Char_t level, Int_t det, const Char_t *className, const Char_t *text)
void resetInputVersions()
void createMbo(Int_t, Int_t, const Char_t *)
HMdcCalParMbo(Int_t tdc=96, const Text_t *name="")
void readline(const Char_t *, Int_t *)
HMdcCalParRawSec(Int_t mod=4)
#define INFO_msg(level, det, text)
HParSet * findContainer(const Char_t *)
HParSet * getContainer(const Text_t *)
Bool_t status
versions of container in the 2 possible inputs
ClassImp(HMdcCalParTdc) ClassImp(HMdcCalParMbo) ClassImp(HMdcCalParRawMod) ClassImp(HMdcCalParRawSec) ClassImp(HMdcCalParRaw) void HMdcCalParTdc
#define SEPERATOR_msg(sep, num)
virtual Int_t write(HParSet *)
void putAsciiHeader(TString &)
HMdcCalParRaw(const Char_t *name="MdcCalParRaw", const Char_t *title="raw calibration parameters for Mdc", const Char_t *context="MdcCalParRawProduction", Int_t n=6)
HMessageMgr * getMsg(void)
virtual Bool_t init(void)