Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell committed Feb 15, 2024
1 parent 47be79a commit d7d6be3
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 20 deletions.
49 changes: 30 additions & 19 deletions k4FWCore/components/IIOSvc.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
/*****************************************************************************\
* (c) Copyright 2000-2019 CERN for the benefit of the LHCb Collaboration *
* *
* This software is distributed under the terms of the GNU General Public *
* Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". *
* *
* In applying this licence, CERN does not waive the privileges and immunities *
* granted to it by virtue of its status as an Intergovernmental Organization *
* or submit itself to any jurisdiction. *
\*****************************************************************************/
#pragma once
/*
* Copyright (c) 2014-2023 Key4hep-Project.
*
* This file is part of Key4hep.
* See https://key4hep.github.io/key4hep-doc/ for further info.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef FWCORE_IIOSVC_H
#define FWCORE_IIOSVC_H

#include "GaudiKernel/IInterface.h"

Expand All @@ -23,21 +32,23 @@
* The interface implemented by any class making IO and reading RawEvent Data
*/
class IIOSvc : virtual public IInterface {

public:
struct EndOfInput : std::logic_error {
EndOfInput() : logic_error( "Reached end of input while more data were expected" ){};
EndOfInput() : logic_error("Reached end of input while more data were expected"){};
};

public:
/// InterfaceID
DeclareInterfaceID( IIOSvc, 1, 0 );
DeclareInterfaceID(IIOSvc, 1, 0);

virtual std::tuple<std::vector<std::shared_ptr<podio::CollectionBase>>, std::vector<std::string>, podio::Frame> next( ) = 0;
virtual std::tuple<std::vector<std::shared_ptr<podio::CollectionBase>>, std::vector<std::string>, podio::Frame>
next() = 0;
virtual std::shared_ptr<std::vector<std::string>> getCollectionNames() const = 0;

virtual std::shared_ptr<podio::ROOTWriter> getWriter() = 0;
virtual void deleteWriter() = 0;
virtual void deleteReader() = 0;
virtual bool writeCollection( const std::string& collName) = 0;
virtual std::shared_ptr<podio::ROOTWriter> getWriter() = 0;
virtual void deleteWriter() = 0;
virtual void deleteReader() = 0;
virtual bool writeCollection(const std::string& collName) = 0;
};

#endif
2 changes: 1 addition & 1 deletion k4FWCore/components/Reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
#include "GaudiKernel/AnyDataWrapper.h"
#include "GaudiKernel/IDataProviderSvc.h"

#include "IIOSvc.h"

#include "podio/CollectionBase.h"
#include "podio/Frame.h"

#include "IIOSvc.h"
#include "k4FWCore/FunctionalUtils.h"

#include <memory>
Expand Down

0 comments on commit d7d6be3

Please sign in to comment.