Changeset 19688 for trunk/Mars


Ignore:
Timestamp:
09/27/19 16:40:42 (5 years ago)
Author:
tbretz
Message:
Propagate name of camera geometry to the header
Location:
trunk/Mars/mfileio
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/mfileio/MWriteFitsFile.cc

    r19434 r19688  
    344344}
    345345
    346 void MWriteFitsFile::SetupHeaderKeys(MRawRunHeader &header)
     346void MWriteFitsFile::SetupHeaderKeys(MRawRunHeader &header, const char *geometry)
    347347{
    348348    const MTime now(-1);
     
    368368    SetHeaderKey("NROITM", 0, "");
    369369    SetHeaderKey("TMSHIFT", 0, "");
    370     SetHeaderKey("CAMERA", "MGeomCamFACT", "Montecarlo File");
     370    SetHeaderKey("CAMERA", geometry, "Montecarlo File");
    371371    SetHeaderKey("DAQ", "DRS4", "Montecarlo File");
    372372
    373373    // FTemme: ADCRANGE and ADC have to be calculated, using the values for
    374374    // the fadctype.
    375 //    SetHeaderKey("ADCRANGE", 2000, "Dynamic range in mV");
    376 //    SetHeaderKey("ADC", 12, "Resolution in bits");
     375    SetHeaderKey("ADCRANGE", 2000, "Dynamic range in mV");
     376    SetHeaderKey("ADC", UShort_t(header.GetFadcResolution()), "Resolution in bits");
    377377
    378378    switch(header.GetRunType())
     
    12341234
    12351235   MRawRunHeader* header = (MRawRunHeader*)pList->FindObject("MRawRunHeader");
    1236    SetupHeaderKeys(*header);
     1236   SetupHeaderKeys(*header, fGeometry);
    12371237
    12381238   if (GetContainer(pList) == kFALSE)
  • trunk/Mars/mfileio/MWriteFitsFile.h

    r18594 r19688  
    116116   TString fGroupName;  // name of top level group
    117117   TString fTitle;      // title of top level group
     118
     119   TString fGeometry;
    118120
    119121   void OpenTopLevelGroup(const char * fname);
     
    150152   Int_t       PostProcess();
    151153
    152    void        SetupHeaderKeys(MRawRunHeader &header);
     154   void        SetupHeaderKeys(MRawRunHeader &header, const char *geometry);
    153155
    154156public:
     
    164166           typeName == "x" || typeName == "y")   //long long
    165167           returnVal << value;
    166 
    167168       if (typeName == "b")
    168169       {
     
    267268   }
    268269
     270   void SetGeometry(const TString &geom) { fGeometry = geom; }
     271
    269272   ClassDef(MWriteFitsFile, 0)   
    270273};
Note: See TracChangeset for help on using the changeset viewer.