PixelDelay25Calib

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
#ifndef PixelDELAY25CALIB_h
#define PixelDELAY25CALIB_h
/**
*   \file CalibFormats/SiPixelObjects/interface/PixelDelay25Calib.h
*   \brief This class manages data and files used in the Delay25 calibration
*
*   A longer explanation will be placed here later
*/
#include <vector>
#include <string>
#include <set>
#include <fstream>
#include "CalibFormats/SiPixelObjects/interface/PixelCalibBase.h"
#include "CalibFormats/SiPixelObjects/interface/PixelConfigBase.h"

namespace pos {
  /*!  \ingroup ConfigurationObjects "Configuration Objects"
*    
*  @{
*
*  \class PixelDelay25Calib PixelDelay25Calib.h
*  \brief This class manages data and files used in the Delay25 calibration
*/
  class PixelDelay25Calib : public PixelCalibBase, public PixelConfigBase {
  public:
    PixelDelay25Calib(std::string);
    PixelDelay25Calib(std::vector<std::vector<std::string> > &);
    ~PixelDelay25Calib() override;

    void writeASCII(std::string dir = "") const override;
    void writeXML(pos::PixelConfigKey key, int version, std::string path) const override { ; }
    void writeXMLHeader(pos::PixelConfigKey key,
                        int version,
                        std::string path,
                        std::ofstream *out,
                        std::ofstream *out1 = nullptr,
                        std::ofstream *out2 = nullptr) const override;
    void writeXML(std::ofstream *out, std::ofstream *out1 = nullptr, std::ofstream *out2 = nullptr) const override;
    void writeXMLTrailer(std::ofstream *out,
                         std::ofstream *out1 = nullptr,
                         std::ofstream *out2 = nullptr) const override;

    std::set<std::string> &portcardList() { return portcardNames_; }
    bool allPortcards() { return allPortcards_; }
    bool allModules() { return allModules_; }
    int getGridSize() { return gridSize_; }
    int getGridSteps() { return gridSteps_; }
    int getNumberTests() { return numTests_; }
    int getRange() { return range_; }
    int getOrigSDa() { return origSDa_; }
    int getOrigRDa() { return origRDa_; }
    int getCommands() { return commands_; }
    void openFiles(std::string portcardName, std::string moduleName, std::string path = "");
    void writeSettings(std::string portcardName, std::string moduleName);
    void writeFiles(std::string tmp);
    void writeFiles(int currentSDa, int currentRDa, int number);
    void closeFiles();

    // Added by Dario April 28th, 2010
    std::string getStreamedContent(void) const { return calibFileContent_; };

  private:
    std::set<std::string> portcardNames_;
    bool allPortcards_, allModules_;
    int origSDa_, origRDa_, range_, gridSize_, gridSteps_, numTests_, commands_;
    std::ofstream graphout_;
    std::string graph_;

    // Added by Dario April 28th, 2010
    std::string calibFileContent_;
  };
}  // namespace pos
/* @} */
#endif