// Copyright (C) 2010, Guy Barrand. All rights reserved. // See the file tools.license for terms. #ifndef tools_ntuple_booking #define tools_ntuple_booking // a little class to capture booking parameters // to create an ntuple. #include "cids" namespace tools { class ntuple_booking { public: ntuple_booking(){} virtual ~ntuple_booking(){} public: ntuple_booking(const ntuple_booking& a_from) :m_name(a_from.m_name) ,m_title(a_from.m_title) ,m_columns(a_from.m_columns) {} ntuple_booking& operator=(const ntuple_booking& a_from){ m_name = a_from.m_name; m_title = a_from.m_title; m_columns = a_from.m_columns; return *this; } public: template void add_column(const std::string& a_name) { m_columns.push_back(col_t(a_name,_cid(T()))); } public: std::string m_name; std::string m_title; typedef std::pair col_t; std::vector m_columns; }; } #endif